package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpVideoHisDTO;
import com.financing.wap.dao.IFpVideoHisDao;
import com.financing.wap.common.SqlName;
/**
 * fp_video_his  
 * 路演视频记录表 数据访问层实现类
 * @author lisu
 *
 */
 
@Repository("fpVideoHisDao")
public class FpVideoHisDaoImpl extends BaseDaoImpl<FpVideoHisDTO, java.lang.Integer> implements IFpVideoHisDao {


	@Override
	public int insert(FpVideoHisDTO fpVideoHis) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpVideoHisSql.insert, fpVideoHis);
	}

	@Override
	public void update(FpVideoHisDTO fpVideoHis) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpVideoHisSql.update, fpVideoHis);
	}

	@Override
	public void updateForce(FpVideoHisDTO fpVideoHis) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpVideoHisSql.updateForce, fpVideoHis);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpVideoHisSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpVideoHisDTO> queryList(FpVideoHisDTO fpVideoHis) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpVideoHisSql.queryList, fpVideoHis);
	}

	@Override
	public int queryListCount(FpVideoHisDTO fpVideoHis) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpVideoHisSql.queryListCount, fpVideoHis);
	}

	@Override
	public FpVideoHisDTO loadById(Integer id) throws SQLException {
		return  (FpVideoHisDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpVideoHisSql.loadById,id);
	}

	@Override
	public Class<FpVideoHisDTO> getEntityClass() {
		return FpVideoHisDTO.class;
	}
 	
}
